In [1]:
import os

## Set directory
os.chdir('/hpc/group/pbenfeylab/CheWei/CW_data/genesys')

import networkx as nx
from genesys_evaluate import *
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import warnings
# Suppress all warning messages
warnings.filterwarnings("ignore", category=DeprecationWarning)
In [2]:
## Conda Env pytorch-gpu on DCC
print(torch.__version__)
print(sc.__version__) 
1.13.0.post200
1.9.1
In [3]:
## Genes considered/used (shared among samples) 
gene_list = pd.read_csv('./gene_list_1108.csv')

Load Data¶

In [4]:
with open("./genesys_root_data.pkl", 'rb') as file_handle:
    data = pickle.load(file_handle)
    
batch_size = 2000
dataset = Root_Dataset(data['X_test'], data['y_test'])
loader = DataLoader(dataset,
                         batch_size = batch_size,
                         shuffle = True, drop_last=True)
In [5]:
input_size = data['X_train'].shape[1]
## 10 cell types 
output_size = 10
embedding_dim = 256
hidden_dim = 256
n_layers = 2
device = "cpu"
path = "./"

Load trained GeneSys model¶

In [6]:
model = ClassifierLSTM(input_size, output_size, embedding_dim, hidden_dim, n_layers).to(device)
model.load_state_dict(torch.load(path+"best_ALL_1130_continue.pth", map_location=torch.device('cpu')))
model = model
model.eval()
Out[6]:
ClassifierLSTM(
  (fc1): Sequential(
    (0): Linear(in_features=17513, out_features=256, bias=True)
    (1): Dropout(p=0.2, inplace=False)
    (2): GaussianNoise()
  )
  (fc): Sequential(
    (0): ReLU()
    (1): Linear(in_features=512, out_features=512, bias=True)
    (2): ReLU()
    (3): Linear(in_features=512, out_features=10, bias=True)
  )
  (lstm): LSTM(256, 256, num_layers=2, batch_first=True, dropout=0.2, bidirectional=True)
  (dropout): Dropout(p=0.2, inplace=False)
  (b_to_z): DBlock(
    (fc1): Linear(in_features=512, out_features=256, bias=True)
    (fc2): Linear(in_features=512, out_features=256, bias=True)
    (fc_mu): Linear(in_features=256, out_features=512, bias=True)
    (fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
  )
  (bz2_infer_z1): DBlock(
    (fc1): Linear(in_features=1024, out_features=256, bias=True)
    (fc2): Linear(in_features=1024, out_features=256, bias=True)
    (fc_mu): Linear(in_features=256, out_features=512, bias=True)
    (fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
  )
  (z1_to_z2): DBlock(
    (fc1): Linear(in_features=512, out_features=256, bias=True)
    (fc2): Linear(in_features=512, out_features=256, bias=True)
    (fc_mu): Linear(in_features=256, out_features=512, bias=True)
    (fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
  )
  (z_to_x): Decoder(
    (fc1): Linear(in_features=512, out_features=256, bias=True)
    (fc2): Linear(in_features=256, out_features=256, bias=True)
    (fc3): Linear(in_features=256, out_features=17513, bias=True)
  )
)
In [7]:
classes = ['Columella', 'Lateral Root Cap', 'Phloem', 'Xylem', 'Procambium', 'Pericycle', 'Endodermis', 'Cortex', 'Atrichoblast', 'Trichoblast']
class2num = {c: i for (i, c) in enumerate(classes)}
num2class = {i: c for (i, c) in enumerate(classes)}
In [8]:
cts = ['Atrichoblast','Trichoblast','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Lateral Root Cap','Columella']
ctw = np.zeros((len(cts), 17513, 17513))
## number of cells sampled from the atlas
batch_size = 2000
In [9]:
## GRN for the transition t7 to t9
for ct in cts:
    print(ct)
    cws = np.zeros((len(loader), 17513, 17513))
    with torch.no_grad():
        for i, sample in enumerate(loader):
            x = sample['x'].to(device)
            y = sample['y'].to(device)
            y_label = [num2class[i] for i in y.tolist()]
            
            pred_h = model.init_hidden(batch_size)
            tfrom = model.generate_next(x, pred_h, 7).to('cpu').detach().numpy()
            cfrom = tfrom[np.where(np.array(y_label)==ct)[0],:]
            
            pred_h = model.init_hidden(batch_size)
            tto = model.generate_next(x, pred_h, 9).to('cpu').detach().numpy()   
            cto = tto[np.where(np.array(y_label)==ct)[0],:]
            
            cw = torch.linalg.lstsq(torch.tensor(cfrom), torch.tensor(cto)).solution.detach().numpy()
            cws[i] = cw
    
    ## Calculate mean across number of repeats
    cwm = np.mean(cws, axis=0)
    ctw[cts.index(ct)] = cwm
Atrichoblast
Trichoblast
Cortex
Endodermis
Pericycle
Procambium
Xylem
Phloem
Lateral Root Cap
Columella
In [10]:
# Save the array to disk
np.save('genesys_ctw_t7-t9.npy', ctw)
In [9]:
ctw = np.load('genesys_ctw_t7-t9.npy')
In [10]:
## Calculate z-scores
ctw_z = np.zeros((len(cts), 17513, 17513))
for i in range(len(cts)):
    ctw_z[i] = (ctw[i] - np.mean(ctw[i])) / np.std(ctw[i])
In [11]:
## Filtering based on z-scores (with no weights)
ctw_f = np.zeros((len(cts), 17513, 17513))
## z-score threshold (keep values > mean + threshold*std)
threshold=3
for i in range(len(cts)):
    ctw_f[i] = np.abs(ctw_z[i]) > threshold

Load TFs list¶

In [12]:
wanted_TFs = pd.read_csv("./Kay_TF_thalemine_annotations.csv")
In [13]:
## Make TF names unique and assign preferred names
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G33880"]="WOX9"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G45160"]="SCL27"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G04410"]="NAC78"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G29035"]="ORS1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G02540"]="ZHD3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G16500"]="IAA26"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G09740"]="HAG5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G24660"]="ZHD2"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G46880"]="HDG5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G28420"]="RLT1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G14580"]="BLJ"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G45260"]="BIB"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G02070"]="RVN"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G28160"]="FIT"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G68360"]="GIS3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G20640"]="NLP4"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G05550"]="VFP5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G59470"]="FRF1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G15150"]="HAT7"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G14750"]="WER"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G75710"]="BRON"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G74500"]="TMO7"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G12646"]="RITF1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G48100"]="ARR5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G16141"]="GATA17L"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G65640"]="NFL"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G62700"]="VND5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G36160"]="VND2"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G66300"]="VND3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G12260"]="VND4"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G62380"]="VND6"
In [14]:
pd.Series(wanted_TFs['Name']).value_counts().head(5)
Out[14]:
NAC001    1
PRE5      1
MYB118    1
MYB21     1
MYB0      1
Name: Name, dtype: int64

Network analysis¶

In [15]:
TFidx = []
for i in wanted_TFs['GeneID']:
    if i in gene_list['features'].tolist():
        TFidx.append(np.where(gene_list['features']==i)[0][0])

TFidx = np.sort(np.array(TFidx))
In [16]:
def network(i):
    ## No weights
    adj_nw = ctw_f[i]
    ## Weighted
    adj = ctw[i]*ctw_f[i]
    ## TF only
    adj = adj[np.ix_(TFidx,TFidx)]
    adj_nw = adj_nw[np.ix_(TFidx,TFidx)]
    
    ## Remove no connect 
    regidx = np.sort(np.array(pd.Series(np.where(adj_nw==True)[0]).value_counts().index[pd.Series(np.where(adj_nw==True)[0]).value_counts()>=1]))
    taridx = np.sort(np.array(pd.Series(np.where(adj_nw==True)[1]).value_counts().index[pd.Series(np.where(adj_nw==True)[1]).value_counts()>=1]))
    ## Reciprocol
    keepidx = np.sort(np.array(list(set(regidx).intersection(taridx))))
    #keepidx = np.sort(np.array(list(set(regidx).union(taridx))))
    
    TFID = np.array(gene_list['features'][TFidx])[keepidx].tolist()
    ## TF name to keep
    TFname = []
    for i in np.array(gene_list['features'][TFidx])[keepidx]:
        TFname.append(wanted_TFs['Name'][np.where(wanted_TFs['GeneID']==i)[0][0]])
        
    adj = adj[np.ix_(keepidx,keepidx)]
    
    # Create a NetworkX graph for non-directed edges
    G = nx.Graph()  # supports directed edges and allows for multiple edges between the same pair of nodes
    
    # Add nodes to the graph
    num_nodes = adj.shape[0]
    for i, name in enumerate(TFname):
        G.add_node(i, name=name)
    
    # Add edges to the graph with weights
    for i in range(num_nodes):
        for j in range(num_nodes):
            weight = adj[i, j]
            if weight != 0:
                G.add_edge(i, j, weight=abs(weight), distance=1/abs(weight))
            

    ## Measures the extent to which how close a node is to all other nodes in the network, considering the shortest paths or geodesic distances between nodes
    closeness_centrality = nx.closeness_centrality(G, distance='distance')
    ## Measures the extent to which a node that are not only well-connected but also connected to other well-connected nodes.
    eigenvector_centrality = nx.eigenvector_centrality(G)
    
    # Create a NetworkX graph for diected edges
    G = nx.MultiDiGraph()  # supports directed edges and allows for multiple edges between the same pair of nodes
    
    # Add nodes to the graph
    num_nodes = adj.shape[0]
    for i, name in enumerate(TFname):
        G.add_node(i, name=name)
    
    # Add edges to the graph with weights
    for i in range(num_nodes):
        for j in range(num_nodes):
            weight = adj[i, j]
            if weight != 0:
                G.add_edge(i, j, weight=weight)
    
    ## Measures the number of connections (edges) each node has
    degree_centrality = nx.degree_centrality(G)
    # Calculate outgoing centrality
    out_centrality = nx.out_degree_centrality(G)
    # Calculate incoming centrality
    in_centrality = nx.in_degree_centrality(G)
    ## Measures the extent to which a node lies on the shortest paths between other nodes.
    betweenness_centrality = nx.betweenness_centrality(G, weight='weight')
    
    ## Non_Reciprocal Out centrality
    # Visualize the graph
    pos = nx.spring_layout(G)  # Positions of the nodes
    
    # Node colors based on weighted betweenness centrality
    node_colors = [out_centrality[node] for node in G.nodes()]
    
    # Node sizes based on weighted betweenness centrality
    node_sizes = [out_centrality[node] * 1000 for node in G.nodes()]

    # Get the edge weights as a dictionary
    edge_weights = nx.get_edge_attributes(G, 'weight')
    edge_colors = ['red' if weight > 0 else 'blue' for (_, _, weight) in G.edges(data='weight')]
    
    # Scale the edge weights to desired linewidths
    max_weight = max(edge_weights.values())
    edge_widths = [float(edge_weights[edge]) / max_weight for edge in G.edges]
    
    # Draw the graph
    nx.draw(G, pos=pos, node_color=node_colors, node_size=node_sizes, with_labels=False, width=edge_widths, edge_color=edge_colors)
    # Add node labels
    labels = {node: G.nodes[node]['name'] for node in G.nodes}
    nx.draw_networkx_labels(G, pos=pos, labels=labels, font_size=8)
    
    # Add a colorbar to show the weighted betweenness centrality color mapping
    sm = plt.cm.ScalarMappable(cmap='viridis', norm=plt.Normalize(vmin=min(node_colors), vmax=max(node_colors)))
    sm.set_array([])
    plt.colorbar(sm)
    
    # Show the plot
    plt.show()
    
    dc = pd.DataFrame.from_dict(degree_centrality, orient='index', columns=['degree_centrality'])
    oc = pd.DataFrame.from_dict(out_centrality, orient='index', columns=['out_centrality'])
    ic = pd.DataFrame.from_dict(in_centrality, orient='index', columns=['in_centrality'])
    bc = pd.DataFrame.from_dict(betweenness_centrality, orient='index', columns=['betweenness_centrality'])
    cc = pd.DataFrame.from_dict(closeness_centrality, orient='index', columns=['closeness_centrality'])
    ec = pd.DataFrame.from_dict(eigenvector_centrality, orient='index', columns=['eigenvector_centrality'])
    df = pd.concat([dc,oc,ic,bc,cc,ec], axis=1)
    df.index =TFname
    df = df.sort_values('betweenness_centrality', ascending=False)
    
    return(df)
In [17]:
atri = network(0)
In [18]:
tri = network(1)
In [19]:
cor = network(2)
In [20]:
end = network(3)
In [21]:
per = network(4)
In [22]:
pro = network(5)
In [23]:
xyl = network(6)
In [24]:
phl = network(7)
In [25]:
lrc = network(8)
In [26]:
col = network(9)
In [27]:
atri.columns = ['atri_degree_centrality','atri_out_centrality','atri_in_centrality','atri_betweenness_centrality','atri_closeness_centrality','atri_eigenvector_centrality']
tri.columns = ['tri_degree_centrality','tri_out_centrality','tri_in_centrality','tri_betweenness_centrality','tri_closeness_centrality','tri_eigenvector_centrality']
cor.columns = ['cor_degree_centrality','cor_out_centrality','cor_in_centrality','cor_betweenness_centrality','cor_closeness_centrality','cor_eigenvector_centrality']
end.columns = ['end_degree_centrality','end_out_centrality','end_in_centrality','end_betweenness_centrality','end_closeness_centrality','end_eigenvector_centrality']
per.columns = ['per_degree_centrality','per_out_centrality','per_in_centrality','per_betweenness_centrality','per_closeness_centrality','per_eigenvector_centrality']
pro.columns = ['pro_degree_centrality','pro_out_centrality','pro_in_centrality','pro_betweenness_centrality','pro_closeness_centrality','pro_eigenvector_centrality']
xyl.columns = ['xyl_degree_centrality','xyl_out_centrality','xyl_in_centrality','xyl_betweenness_centrality','xyl_closeness_centrality','xyl_eigenvector_centrality']
phl.columns = ['phl_degree_centrality','phl_out_centrality','phl_in_centrality','phl_betweenness_centrality','phl_closeness_centrality','phl_eigenvector_centrality']
lrc.columns = ['lrc_degree_centrality','lrc_out_centrality','lrc_in_centrality','lrc_betweenness_centrality','lrc_closeness_centrality','lrc_eigenvector_centrality']
col.columns = ['col_degree_centrality','col_out_centrality','col_in_centrality','col_betweenness_centrality','col_closeness_centrality','col_eigenvector_centrality']
In [28]:
## Indentify main regulators in each net work
tff = []
tff = tff + atri[atri['atri_betweenness_centrality']>0].index.tolist()
tff = tff + tri[tri['tri_betweenness_centrality']>0].index.tolist()
tff = tff + lrc[lrc['lrc_betweenness_centrality']>0].index.tolist()
tff = tff + cor[cor['cor_betweenness_centrality']>0].index.tolist()
tff = tff + end[end['end_betweenness_centrality']>0].index.tolist()
tff = tff + per[per['per_betweenness_centrality']>0].index.tolist()
tff = tff + pro[pro['pro_betweenness_centrality']>0].index.tolist()
tff = tff + xyl[xyl['xyl_betweenness_centrality']>0].index.tolist()
tff = tff + phl[phl['phl_betweenness_centrality']>0].index.tolist()
tff = tff + col[col['col_betweenness_centrality']>0].index.tolist()
tf_occurance = pd.DataFrame(pd.Series(tff).value_counts(), columns=['tf_occurance'])
tf_spec = pd.concat([tf_occurance, atri, tri, lrc, cor, end, per, pro, xyl, phl, col], axis=1)
tf_spec = tf_spec.fillna(0)
In [29]:
## Epidermis (atri, tri, lrc)
celltype1='atri'
celltype2='tri'
celltype3='lrc'
ts = tf_spec[tf_spec['tf_occurance']==3][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype3+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype3+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality', celltype3+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==9].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[29]:
atri_betweenness_centrality tri_betweenness_centrality lrc_betweenness_centrality atri_out_centrality tri_out_centrality lrc_out_centrality atri_in_centrality tri_in_centrality lrc_in_centrality centrality_count centrality_sum
AT2G28710 0.915490 0.018175 0.002137 0.424855 0.216 0.004274 0.456647 0.074667 0.220085 9 11.332330
KAN 0.677172 0.000043 0.000014 0.017341 0.056 0.051282 0.225434 0.098667 0.044872 9 10.170823
AT5G22890 0.013513 0.000349 0.121452 0.144509 0.024 0.008547 0.156069 0.066667 0.023504 9 9.558610
In [30]:
## atri, tri
celltype1='atri'
celltype2='tri'
ts = tf_spec[tf_spec['tf_occurance']==2][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==6].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[30]:
atri_betweenness_centrality tri_betweenness_centrality atri_out_centrality tri_out_centrality atri_in_centrality tri_in_centrality centrality_count centrality_sum
LRL3 0.879551 0.871879 0.736994 0.768000 0.156069 0.930667 6 10.343160
RHD6 0.675480 0.926474 0.320809 0.330667 0.075145 0.669333 6 8.997908
WRKY61 0.912909 0.756606 0.193642 0.141333 0.265896 0.578667 6 8.849053
NAC6 0.913043 0.000093 0.358382 0.216000 0.511561 0.045333 6 8.044412
HRS1 0.472481 0.001747 0.196532 0.061333 0.182081 0.264000 6 7.178173
HFR1 0.417550 0.021234 0.193642 0.042667 0.115607 0.186667 6 6.977366
MYB50 0.026012 0.000813 0.130058 0.018667 0.352601 0.106667 6 6.634817
WRKY4 0.005772 0.027622 0.034682 0.109333 0.060694 0.029333 6 6.267436
In [31]:
## Atrichoblast specific
celltype = 'atri'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[31]:
atri_betweenness_centrality atri_out_centrality atri_in_centrality centrality_count centrality_sum
AT4G01350 0.00578 0.083815 0.075145 3 3.164740
HB24 0.00578 0.176301 0.213873 3 3.395954
PUX2 0.00289 0.005780 0.031792 3 3.040462
In [32]:
## Trichoblast specific
celltype = 'tri'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[32]:
tri_betweenness_centrality tri_out_centrality tri_in_centrality centrality_count centrality_sum
RSL2 0.913319 0.056000 0.634667 3 4.603986
AT4G09100 0.817291 0.760000 0.424000 3 5.001291
IAA31 0.771258 0.218667 0.194667 3 4.184592
AT5G56200 0.369561 0.138667 0.194667 3 3.702895
KNAT3 0.332720 0.085333 0.064000 3 3.482053
AT4G39160 0.109476 0.189333 0.064000 3 3.362809
AT3G53370 0.090781 0.256000 0.114667 3 3.461447
RAP2.11 0.070595 0.085333 0.208000 3 3.363929
RSL4 0.046403 0.136000 0.264000 3 3.446403
HB23 0.017583 0.069333 0.117333 3 3.204250
AT2G05160 0.017098 0.085333 0.136000 3 3.238431
AT2G20030 0.013077 0.045333 0.152000 3 3.210410
FBH3 0.010467 0.061333 0.101333 3 3.173134
AT2G37120 0.004520 0.072000 0.056000 3 3.132520
AT2G14760 0.002610 0.013333 0.013333 3 3.029276
MC2 0.002610 0.061333 0.090667 3 3.154610
bZIP23 0.002602 0.037333 0.064000 3 3.103936
NPR1 0.001569 0.013333 0.090667 3 3.105569
AT3G05760 0.000991 0.026667 0.077333 3 3.104991
AT2G27580 0.000684 0.056000 0.058667 3 3.115351
WRKY42 0.000043 0.029333 0.149333 3 3.178709
In [33]:
## LRC specific
celltype = 'lrc'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[33]:
lrc_betweenness_centrality lrc_out_centrality lrc_in_centrality centrality_count centrality_sum
TTG2 0.889603 0.085470 0.094017 3 4.069090
MYB51 0.777604 0.021368 0.025641 3 3.824612
IAA1 0.558658 0.074786 0.072650 3 3.706094
CRF3 0.539669 0.155983 0.117521 3 3.813174
PLT1 0.358622 0.380342 0.019231 3 3.758195
SPT 0.358361 0.104701 0.025641 3 3.488703
ARF16 0.339272 0.072650 0.087607 3 3.499529
AT1G09250 0.308639 0.027778 0.038462 3 3.374879
GATA2 0.191658 0.243590 0.019231 3 3.454478
ATCTH 0.125556 0.213675 0.057692 3 3.396923
AT1G26680 0.120033 0.452991 0.014957 3 3.587982
TRP1 0.113701 0.051282 0.032051 3 3.197034
OFP6 0.110018 0.158120 0.034188 3 3.302325
ASL1 0.082267 0.143162 0.089744 3 3.315173
HAT7 0.011484 0.185897 0.032051 3 3.229433
GRF2 0.008167 0.074786 0.023504 3 3.106458
MYB23 0.004274 0.055556 0.138889 3 3.198718
AT2G42300 0.002137 0.036325 0.042735 3 3.081197
AT2G29065 0.001290 0.059829 0.029915 3 3.091034
NAC052 0.000943 0.070513 0.108974 3 3.180430
RR12 0.000764 0.087607 0.023504 3 3.111875
E2F1 0.000645 0.038462 0.027778 3 3.066884
HAM3 0.000384 0.100427 0.025641 3 3.126453
AT5G62610 0.000325 0.085470 0.008547 3 3.094342
WRKY65 0.000229 0.087607 0.012821 3 3.100656
AT1G69030 0.000037 0.081197 0.025641 3 3.106874
In [34]:
## Columella specific
celltype = 'col'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[34]:
col_betweenness_centrality col_out_centrality col_in_centrality centrality_count centrality_sum
ARF10 0.468511 0.042994 0.176752 3 3.688256
SCL1 0.466436 0.098726 0.184713 3 3.749876
RAT5 0.462749 0.014331 0.076433 3 3.553513
SNI1 0.007952 0.073248 0.098726 3 3.179926
AT1G76580 0.006367 0.039809 0.286624 3 3.332800
AT1G21780 0.005775 0.019108 0.076433 3 3.101317
HSF A4A 0.003332 0.027070 0.144904 3 3.175307
AT2G44430 0.001732 0.098726 0.054140 3 3.154598
BZIP60 0.001615 0.074841 0.046178 3 3.122634
AT3G08505 0.001592 0.009554 0.046178 3 3.057325
TTG1 0.001592 0.074841 0.014331 3 3.090764
EIL3 0.001592 0.025478 0.038217 3 3.065287
WRKY35 0.001587 0.052548 0.036624 3 3.090759
RHA1 0.001582 0.007962 0.001592 3 3.011136
BBX28 0.000742 0.015924 0.022293 3 3.038958
CHR11 0.000510 0.031847 0.101911 3 3.134268
RR1 0.000373 0.200637 0.073248 3 3.274259
AT3G52250 0.000183 0.065287 0.055732 3 3.121202
ATRX 0.000140 0.128981 0.085987 3 3.215108
SNL2 0.000137 0.090764 0.038217 3 3.129118
SPL1 0.000114 0.066879 0.019108 3 3.086102
IDD1 0.000112 0.062102 0.036624 3 3.098838
AT5G12400 0.000066 0.052548 0.070064 3 3.122677
TLP7 0.000061 0.090764 0.030255 3 3.121080
AT1G74250 0.000056 0.031847 0.074841 3 3.106744
CDC5 0.000033 0.039809 0.025478 3 3.065320
TLP10 0.000025 0.068471 0.046178 3 3.114675
HSL1 0.000020 0.028662 0.117834 3 3.146517
AT1G50410 0.000013 0.030255 0.038217 3 3.068484
EIL1 0.000008 0.130573 0.012739 3 3.143320
BRM 0.000005 0.074841 0.025478 3 3.100324
HMG 0.000005 0.090764 0.027070 3 3.117839
In [35]:
## Ground tissue
celltype1='cor'
celltype2='end'
ts = tf_spec[tf_spec['tf_occurance']==2][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==6].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[35]:
cor_betweenness_centrality end_betweenness_centrality cor_out_centrality end_out_centrality cor_in_centrality end_in_centrality centrality_count centrality_sum
AT1G05710 0.483670 0.023826 0.808642 0.116022 0.962963 0.296961 6 8.692084
MYB122 0.002523 0.004275 0.246914 0.016575 0.163580 0.157459 6 6.591325
IDD4 0.003736 0.000023 0.200617 0.027624 0.243827 0.031768 6 6.507596
RAX2 0.000143 0.016544 0.237654 0.088398 0.043210 0.051105 6 6.437054
ZFN1 0.000143 0.000827 0.089506 0.037293 0.101852 0.004144 6 6.233765
GATA27 0.000382 0.000258 0.077160 0.015193 0.040123 0.045580 6 6.178698
AT2G47890 0.000057 0.071598 0.046296 0.023481 0.030864 0.004144 6 6.176440
BBX21 0.000029 0.000059 0.033951 0.017956 0.003086 0.026243 6 6.081324
In [36]:
## Cortex specific
celltype = 'cor'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[36]:
cor_betweenness_centrality cor_out_centrality cor_in_centrality centrality_count centrality_sum
LAF1 0.095574 0.262346 0.842593 3 4.200512
JKD 0.029068 0.466049 0.108025 3 3.603142
JAZ6 0.012871 0.212963 0.354938 3 3.580772
BZS1 0.008562 0.330247 0.259259 3 3.598068
HB5 0.007797 0.438272 0.132716 3 3.578785
GLK2 0.006221 0.012346 0.209877 3 3.228443
AT1G72210 0.004357 0.172840 0.256173 3 3.433370
KNAT5 0.003077 0.030864 0.098765 3 3.132706
NSI 0.001682 0.018519 0.027778 3 3.047978
NAC084 0.001424 0.055556 0.006173 3 3.063152
AT2G42660 0.000965 0.021605 0.148148 3 3.170718
COL4 0.000707 0.132716 0.154321 3 3.287744
ABF2 0.000487 0.070988 0.018519 3 3.089994
AT3G61180 0.000468 0.027778 0.046296 3 3.074542
ABS2 0.000382 0.033951 0.003086 3 3.037419
JMJ18 0.000315 0.009259 0.009259 3 3.018834
ASIL2 0.000296 0.009259 0.006173 3 3.015728
AT4G16150 0.000296 0.030864 0.052469 3 3.083630
GATA26 0.000248 0.009259 0.083333 3 3.092841
RAP2.7 0.000239 0.117284 0.030864 3 3.148387
IAA16 0.000229 0.067901 0.018519 3 3.086649
WRKY69 0.000182 0.117284 0.080247 3 3.197712
LRP1 0.000172 0.058642 0.040123 3 3.098937
IDD7 0.000105 0.009259 0.185185 3 3.194550
PIL5 0.000048 0.027778 0.012346 3 3.040171
AT2G38300 0.000048 0.030864 0.089506 3 3.120418
AT5G24320 0.000048 0.067901 0.027778 3 3.095727
MYB14 0.000029 0.021605 0.021605 3 3.043239
AT1G21580 0.000029 0.012346 0.061728 3 3.074103
PAT1 0.000029 0.049383 0.070988 3 3.120399
SIGA 0.000029 0.018519 0.003086 3 3.021634
FRS8 0.000019 0.012346 0.018519 3 3.030883
AGL17 0.000019 0.009259 0.015432 3 3.024710
LBD39 0.000019 0.012346 0.015432 3 3.027797
LZF1 0.000019 0.030864 0.012346 3 3.043229
AP2 0.000019 0.037037 0.033951 3 3.071007
SIGE 0.000019 0.021605 0.067901 3 3.089525
ZFN3 0.000019 0.033951 0.024691 3 3.058661
BZO2H1 0.000019 0.009259 0.012346 3 3.021624
RBR1 0.000019 0.003086 0.006173 3 3.009278
AT3G13040 0.000010 0.024691 0.037037 3 3.061738
RGL3 0.000010 0.021605 0.027778 3 3.049392
FRS2 0.000010 0.012346 0.021605 3 3.033960
NPH4 0.000010 0.015432 0.015432 3 3.030874
AT4G01280 0.000010 0.012346 0.027778 3 3.040133
ERF15 0.000010 0.129630 0.046296 3 3.175935
ETR1 0.000010 0.009259 0.043210 3 3.052479
AGL42 0.000010 0.129630 0.043210 3 3.172849
DBP1 0.000010 0.030864 0.012346 3 3.043219
ALY2 0.000010 0.006173 0.015432 3 3.021614
In [37]:
## Endodermis specific
celltype = 'end'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[37]:
end_betweenness_centrality end_out_centrality end_in_centrality centrality_count centrality_sum
bZIP58 0.467489 0.096685 0.310773 3 3.874947
AT4G00940 0.379573 0.082873 0.194751 3 3.657197
MYB68 0.267803 0.020718 0.174033 3 3.462554
ERF73 0.016785 0.001381 0.029006 3 3.047171
BLJ 0.009432 0.116022 0.081492 3 3.206945
AGL102 0.008068 0.013812 0.436464 3 3.458344
TIFY8 0.004293 0.038674 0.143646 3 3.186613
AT5G58620 0.001494 0.042818 0.125691 3 3.170002
chr31 0.000556 0.234807 0.178177 3 3.413539
AT1G61990 0.000252 0.002762 0.004144 3 3.007158
TOC1 0.000145 0.004144 0.002762 3 3.007051
BIB 0.000092 0.004144 0.034530 3 3.038766
COL3 0.000032 0.002762 0.001381 3 3.004176
DEL2 0.000021 0.002762 0.013812 3 3.016596
AT4G38340 0.000013 0.016575 0.290055 3 3.306643
AMS 0.000010 0.002762 0.051105 3 3.053877
COP1 0.000004 0.016575 0.013812 3 3.030391
SAP7 0.000002 0.024862 0.016575 3 3.041438
In [38]:
## Stele
celltype1='per'
celltype2='pro'
celltype3='xyl'
celltype4='phl'
ts = tf_spec[tf_spec['tf_occurance']==4][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype3+'_betweenness_centrality', celltype4+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype3+'_out_centrality', celltype4+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality', celltype3+'_in_centrality', celltype4+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==12].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[38]:
per_betweenness_centrality pro_betweenness_centrality xyl_betweenness_centrality phl_betweenness_centrality per_out_centrality pro_out_centrality xyl_out_centrality phl_out_centrality per_in_centrality pro_in_centrality xyl_in_centrality phl_in_centrality centrality_count centrality_sum
IAA11 0.007843 0.001321 0.041726 0.000117 0.064018 0.100592 0.309677 0.106132 0.116998 0.019724 0.741935 0.090802 12 13.600886
RMA2 0.005347 0.000058 0.012359 0.000096 0.036424 0.086785 0.270968 0.104953 0.121413 0.003945 0.335484 0.063679 12 13.041510
In [39]:
## Pericycle
celltype = 'per'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[39]:
per_betweenness_centrality per_out_centrality per_in_centrality centrality_count centrality_sum
MYBC1 0.991288 0.570640 0.272627 3 4.834555
LBD14 0.959133 0.036424 0.014349 3 4.009906
AT2G14880 0.640940 0.040839 0.054084 3 3.735863
IDD11 0.280223 0.162252 0.048565 3 3.491039
HDA3 0.083967 0.015453 0.016556 3 3.115976
AT2G20100 0.044365 0.048565 0.054084 3 3.147014
GATA23 0.020000 0.098234 0.022075 3 3.140310
ULT1 0.006701 0.069536 0.006623 3 3.082860
CDF3 0.003302 0.013245 0.093819 3 3.110366
BHLH32 0.002582 0.108168 0.054084 3 3.164834
AT1G75490 0.002200 0.024283 0.037528 3 3.064010
GATA16 0.001400 0.090508 0.009934 3 3.101842
PHV 0.001104 0.008830 0.075055 3 3.084989
BBX30 0.001104 0.001104 0.026490 3 3.028698
AT2G40200 0.001099 0.024283 0.065121 3 3.090503
ERF10 0.000583 0.030905 0.001104 3 3.032592
SHR 0.000009 0.101545 0.011038 3 3.112591
HB20 0.000009 0.107064 0.007726 3 3.114799
ZML2 0.000001 0.036424 0.015453 3 3.051878
In [40]:
## Procambium
celltype = 'pro'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[40]:
pro_betweenness_centrality pro_out_centrality pro_in_centrality centrality_count centrality_sum
REV 0.021267 0.063116 0.282051 3 3.366435
AT4G25410 0.001949 0.045365 0.035503 3 3.082817
AS1 0.000799 0.035503 0.013807 3 3.050109
AT2G39020 0.000725 0.031558 0.007890 3 3.040173
BES1 0.000686 0.031558 0.072978 3 3.105223
GRP2 0.000674 0.019724 0.102564 3 3.122962
CCA1 0.000651 0.041420 0.005917 3 3.047988
AT1G28310 0.000635 0.017751 0.067061 3 3.085448
AT3G03550 0.000468 0.023669 0.078895 3 3.103032
AT2G38090 0.000273 0.009862 0.057199 3 3.067334
TCP20 0.000261 0.031558 0.025641 3 3.057460
CIP8 0.000144 0.013807 0.015779 3 3.029730
GAI 0.000144 0.049310 0.011834 3 3.061288
HB18 0.000125 0.029586 0.088757 3 3.118468
FRS12 0.000105 0.005917 0.019724 3 3.025746
AGL80 0.000097 0.005917 0.007890 3 3.013904
AT2G47210 0.000097 0.031558 0.021696 3 3.053352
AT2G18090 0.000090 0.033531 0.009862 3 3.043482
NF-YB10 0.000070 0.025641 0.023669 3 3.049380
AT5G51790 0.000047 0.005917 0.023669 3 3.029633
RGA1 0.000047 0.019724 0.017751 3 3.037522
AGL18 0.000043 0.035503 0.001972 3 3.037518
AL2 0.000043 0.019724 0.011834 3 3.031601
AT4G22820 0.000039 0.023669 0.023669 3 3.047376
TRFL6 0.000035 0.031558 0.005917 3 3.037510
ARF9 0.000027 0.053254 0.025641 3 3.078923
ATL5 0.000027 0.061144 0.001972 3 3.063144
WRKY21 0.000019 0.059172 0.005917 3 3.065108
GATA1 0.000019 0.009862 0.001972 3 3.011854
AT5G09240 0.000019 0.013807 0.007890 3 3.021716
ASL9 0.000016 0.017751 0.005917 3 3.023684
AT4G31420 0.000016 0.043393 0.017751 3 3.061160
FVE 0.000016 0.023669 0.011834 3 3.035519
AT4G25210 0.000016 0.043393 0.023669 3 3.067077
POB1 0.000016 0.039448 0.019724 3 3.059187
NF-YC4 0.000012 0.019724 0.013807 3 3.033542
ASHH3 0.000012 0.015779 0.009862 3 3.025653
RGL1 0.000012 0.001972 0.007890 3 3.009874
ARIA 0.000012 0.045365 0.019724 3 3.065100
AGL26 0.000012 0.019724 0.003945 3 3.023680
HMGB1 0.000008 0.047337 0.033531 3 3.080876
ILR3 0.000008 0.037475 0.023669 3 3.061152
HK2 0.000008 0.011834 0.003945 3 3.015787
BPC6 0.000008 0.025641 0.005917 3 3.031566
AT3G60080 0.000008 0.047337 0.019724 3 3.067069
ASHH1 0.000008 0.035503 0.021696 3 3.057207
MAF1 0.000004 0.033531 0.015779 3 3.049314
NF-YC1 0.000004 0.001972 0.001972 3 3.003949
AT5G09460 0.000004 0.023669 0.003945 3 3.027617
STH 0.000004 0.021696 0.003945 3 3.025645
MYB109 0.000004 0.003945 0.001972 3 3.005921
AGL21 0.000004 0.023669 0.001972 3 3.025645
HTA10 0.000004 0.017751 0.001972 3 3.019728
BPC4 0.000004 0.025641 0.011834 3 3.037479
HSF3 0.000004 0.013807 0.003945 3 3.017755
AIP3 0.000004 0.015779 0.007890 3 3.023673
NF-YB1 0.000004 0.015779 0.001972 3 3.017755
In [41]:
## Xylem
celltype = 'xyl'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[41]:
xyl_betweenness_centrality xyl_out_centrality xyl_in_centrality centrality_count centrality_sum
AT1G66810 0.967365 0.580645 0.780645 3 5.328655
LBD31 0.946753 0.264516 0.703226 3 4.914495
JLO 0.943067 0.064516 0.845161 3 4.852744
MYB83 0.876707 0.425806 0.793548 3 5.096062
VND5 0.837160 0.090323 0.819355 3 4.746837
VND4 0.830540 0.096774 0.838710 3 4.766024
AT1G68810 0.820486 0.864516 0.619355 3 5.304357
ZHD3 0.801131 0.896774 0.825806 3 5.523712
AT3G10760 0.766820 0.245161 0.077419 3 4.089401
MYB52 0.747047 0.251613 0.748387 3 4.747047
IAA6 0.740302 0.083871 0.083871 3 3.908044
MYB85 0.665061 0.316129 0.541935 3 4.523125
VND1 0.496858 0.180645 0.077419 3 3.754922
VND6 0.430163 0.458065 0.116129 3 4.004357
GATA5 0.329493 0.019355 0.045161 3 3.394009
AT2G22200 0.244198 0.025806 0.122581 3 3.392585
MYB46 0.138961 0.974194 0.864516 3 4.977671
AT5G46910 0.134018 0.212903 0.483871 3 3.830792
BT1 0.132090 0.329032 0.025806 3 3.486929
HB31 0.122832 0.877419 0.038710 3 4.038961
SPL2 0.116129 0.038710 0.012903 3 3.167742
AT2G28200 0.100461 0.316129 0.438710 3 3.855300
AT3G10470 0.065396 0.141935 0.445161 3 3.652493
VND3 0.032551 0.219355 0.554839 3 3.806745
GIF3 0.032132 0.116129 0.219355 3 3.367616
PIF4 0.030792 0.077419 0.225806 3 3.334018
AT3G17100 0.012652 0.090323 0.070968 3 3.173942
OFP10 0.012568 0.038710 0.154839 3 3.206116
SAC51 0.006452 0.006452 0.148387 3 3.161290
AT1G24040 0.006452 0.090323 0.148387 3 3.245161
VND2 0.005614 0.406452 0.787097 3 4.199162
AT1G68200 0.000922 0.206452 0.109677 3 3.317051
In [42]:
## Phloem
celltype = 'phl'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[42]:
phl_betweenness_centrality phl_out_centrality phl_in_centrality centrality_count centrality_sum
AT3G06220 0.054877 0.008255 0.022406 3 3.085538
NAC057 0.023728 0.379717 0.379717 3 3.783162
AT5G63700 0.017423 0.121462 0.201651 3 3.340536
AT5G41380 0.013562 0.301887 0.487028 3 3.802477
WOX2 0.013359 0.011792 0.001179 3 3.026330
... ... ... ... ... ...
NAC78 0.000001 0.021226 0.023585 3 3.044813
AT1G58220 0.000001 0.014151 0.011792 3 3.025945
NFXL2 0.000001 0.010613 0.008255 3 3.018869
AT1G01920 0.000001 0.007075 0.007075 3 3.014152
KAN2 0.000001 0.031840 0.024764 3 3.056605

92 rows × 5 columns

Search for individual genes¶

In [43]:
gene = 'SHR'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[43]:
tf_occurance end_degree_centrality end_out_centrality end_in_centrality end_closeness_centrality end_eigenvector_centrality per_degree_centrality per_out_centrality per_in_centrality per_betweenness_centrality per_closeness_centrality per_eigenvector_centrality pro_degree_centrality pro_out_centrality pro_in_centrality pro_closeness_centrality pro_eigenvector_centrality
SHR 1.0 0.002762 0.001381 0.001381 0.000172 0.002296 0.112583 0.101545 0.011038 0.000009 0.000376 0.051305 0.057199 0.035503 0.021696 0.00019 0.029499
In [44]:
gene = 'BLJ'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[44]:
tf_occurance end_degree_centrality end_out_centrality end_in_centrality end_betweenness_centrality end_closeness_centrality end_eigenvector_centrality
BLJ 1.0 0.197514 0.116022 0.081492 0.009432 0.000315 0.105867
In [45]:
gene = 'JKD'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[45]:
tf_occurance cor_degree_centrality cor_out_centrality cor_in_centrality cor_betweenness_centrality cor_closeness_centrality cor_eigenvector_centrality end_degree_centrality end_out_centrality end_in_centrality end_closeness_centrality end_eigenvector_centrality
JKD 1.0 0.574074 0.466049 0.108025 0.029068 0.000409 0.135451 0.150552 0.09116 0.059392 0.000301 0.089831
In [46]:
gene = 'RVN'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[46]:
end_degree_centrality end_out_centrality end_in_centrality end_closeness_centrality end_eigenvector_centrality
RVN 0.125691 0.030387 0.095304 0.00026 0.085214
In [47]:
gene = 'BIB'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[47]:
tf_occurance end_degree_centrality end_out_centrality end_in_centrality end_betweenness_centrality end_closeness_centrality end_eigenvector_centrality
BIB 1.0 0.038674 0.004144 0.03453 0.000092 0.000193 0.039742
In [48]:
gene = 'IME'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[48]:
In [49]:
gene = 'MYB66'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[49]:
In [50]:
gene = 'GL2'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[50]:
tf_occurance atri_degree_centrality atri_out_centrality atri_in_centrality atri_betweenness_centrality atri_closeness_centrality atri_eigenvector_centrality lrc_degree_centrality lrc_out_centrality lrc_in_centrality lrc_betweenness_centrality lrc_closeness_centrality lrc_eigenvector_centrality
GL2 2.0 0.115607 0.017341 0.098266 0.005529 0.00057 0.040031 0.111111 0.074786 0.036325 0.52678 0.001042 0.049802
In [51]:
tf_spec.to_csv('TF_GRN_centrality_t7-t9_zscore3.csv', index=True)
In [ ]: